﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="needprocess.ascx.cs" Inherits="AnyOffice.general.mytable.needprocess" %>
<div id="module_4" style="position: relative;padding-bottom:10px;">
<table class="TableBlock" width="100%" cellspacing="0" cellpadding="2">
	<tr class="TableHeader">
		<td id="module_4_head" class="TableHeader" width="70%">
			<IMG src="/images/menu/workflow.gif" align="absMiddle"> 待办事宜
		</td>
		<td id="module_4_more" align="right">
			<div id="module_4_op" style="float:right;display:none;">&nbsp;<a id="module_4_url" href="#" onclick="_del('4');"><img border="0" src="/images/x.gif" alt="不显示该模块"></a></div>
			<div style="float:right"><a href="/general/workflow/list/index.aspx">全部</a>&nbsp;</div>
		</td>
	</TR>
	<tr class="TableData" style="background:#FFFFFF url(/images/water/workflow.jpg) no-repeat bottom right">
		<td colspan="2" height="60">
			<div id="divAttend"></div>
			<div id="divWork">
			<asp:repeater id="rptWorkflow" runat="server">		
			<ItemTemplate>工作流：<%#Convert.ToInt32(DataBinder.Eval(Container.DataItem,"PrcsFlag").ToString())==1?"<IMG alt='未接收' src='/images/email_close.gif' align='absMiddle'>":"<IMG alt='已接收' src='/images/email_open.gif' align='absMiddle'>"%>
				<a href="/general/workflow/list/flow_input.aspx?run_id=<%#DataBinder.Eval(Container.DataItem,"RunId")%>&prcs_id=<%#DataBinder.Eval(Container.DataItem,"PrcsId")%>"><%#DataBinder.Eval(Container.DataItem,"FlowName")%> - <%#DataBinder.Eval(Container.DataItem,"RunName")%></a>	
				<br>
			</ItemTemplate>	
			</asp:repeater>
			<asp:Literal id="litWorkflow" runat="server"></asp:Literal>
			</div>
		</td>
	</tr>	
</table>
</div>
<SCRIPT language="javascript">
var timer_attend = null;
function Attend()
{	
	if(timer_attend != null)
		window.clearTimeout(timer_attend);
		
	AnyOffice.general.mytable.AjaxMethods.Attend(CallBack_Attend);
	timer_attend=setTimeout("Attend()",AJAX_INTERVAL*1);
}
function CallBack_Attend(res)
{
	//alert(res.value);
	if (res.error != null)  
		return;
	
	if(res.value != "")
	{
		document.getElementById('divAttend').style.display='';
		document.getElementById('divAttend').innerHTML = res.value;
	}
	else
	{
		document.getElementById('divAttend').style.display='none';
		document.getElementById('divAttend').innerHTML = "";
	}
		
}
Attend();

CODE_IDSTR += "7,";
var timer_work = null;
function GetWork()
{	
	if(timer_work != null)
		window.clearTimeout(timer_work);
		
	AnyOffice.general.mytable.AjaxMethods.GetWork(CallBack_GetWork);
	timer_work=setTimeout("GetWork()",AJAX_INTERVAL*5);
}
function CallBack_GetWork(res)
{	
	if (res.error != null)  
		return;	
	document.getElementById('divWork').innerHTML = res.value;
}
GetWork();
</SCRIPT>


